package org.walkerljl.boss.admin.controller.monitor;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.walkerljl.boss.domain.monitor.MonitorObject;
import org.walkerljl.boss.domain.monitor.MonitorResult;
import org.walkerljl.boss.service.monitor.MonitorObjectService;
import org.walkerljl.boss.service.monitor.MonitorResultService;
import org.walkerljl.boss.support.mvc.entity.ObjectIdentifier;
import org.walkerljl.boss.support.mvc.template.JqueryDatatableCurdTemplate;
import org.walkerljl.boss.support.sdk.auth.annotation.Authentication;
import org.walkerljl.boss.support.sdk.auth.entity.Menu;
import org.walkerljl.boss.support.service.JqueryDatatableBaseService;

import javax.annotation.Resource;

/**
 * 监控对象
 *
 * @author lijunlin
 */
@Controller
@Authentication
@RequestMapping(value = "/monitor/object", method = {RequestMethod.POST, RequestMethod.GET})
public class MonitorObjectController extends JqueryDatatableCurdTemplate<MonitorObject> {

    @Resource
    private MonitorObjectService monitorObjectService;

    public MonitorObjectController() {
        ObjectIdentifier objectIdentifier = new ObjectIdentifier("监控管理/监控对象", "/monitor/object");
        objectIdentifier.setParentMenus(new Menu[]{new Menu("监控对象", null)});
        setObjectIdentifier(objectIdentifier);
    }

    @Override
    public JqueryDatatableBaseService<Long, MonitorObject> getJqueryDatatableBaseService() {
        return monitorObjectService;
    }
}